﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ViewLearn
{
    public class ProductCollection
    {
        static ProductCollection()
        {
            TableProducts.Columns.Add("ProductId");
            TableProducts.Columns.Add("ProductName");
            TableProducts.Columns.Add("Price");
            TableProducts.Columns.Add("ManuDate");
            TableProducts.Columns.Add("Des");
            TableProducts.Columns.Add("ImagePath");

            var row1 = TableProducts.NewRow();
            row1["ProductId"] = 1;
            row1["ProductName"] = "每日坚果";
            row1["Price"] = 19.5m;
            row1["ManuDate"] = new DateTime(2025,1,13);
            row1["Des"] = "500g混合坚果干果果仁礼盒小包";
            row1["ImagePath"] = "pack://application:,,,/ViewLearn;component/每日坚果.webp";
            TableProducts.Rows.Add(row1);
            var row2 = TableProducts.NewRow();
            row2["ProductId"] = 2;
            row2["ProductName"] = "不多言";
            row2["Price"] = 44.9m;
            row2["ManuDate"] = new DateTime(2025,6,25);
            row2["Des"] = "坚果芙饼干巴旦木椰片芙脆曲奇单独小包装干酪蛋糕网红休闲小零食";
            row2["ImagePath"] = "pack://application:,,,/ViewLearn;component/不多言.webp";
            TableProducts.Rows.Add(row2);
            var row3 = TableProducts.NewRow();
            row3["ProductId"] = 3;
            row3["ProductName"] = "杨先生";
            row3["Price"] = 12;
            row3["ManuDate"] = new DateTime(2025,4,5);
            row3["Des"] = "芡实糕点营养早餐";
            row3["ImagePath"] = "pack://application:,,,/ViewLearn;component/杨先生.webp";
            TableProducts.Rows.Add(row3);
            var row4 = TableProducts.NewRow();
            row4["ProductId"] = 4;
            row4["ProductName"] = "满铺";
            row4["Price"] = 20.7m;
            row4["ManuDate"] = new DateTime(2025,3,3);
            row4["Des"] = "靖江猪肉脯干500g蜜汁味手撕肉铺网红零食小吃休闲食品罐装";
            row4["ImagePath"] = "pack://application:,,,/ViewLearn;component/满铺.webp";
            TableProducts.Rows.Add(row4);
            var row5 = TableProducts.NewRow();
            row5["ProductId"] = 5;
            row5["ProductName"] = "优卓";
            row5["Price"] = 23.3m;
            row5["ManuDate"] = new DateTime(2025,2,9);
            row5["Des"] = "山楂片干零食蓝莓桑葚官方旗舰店正宗无添加儿童健康小吃营养食品";
            row5["ImagePath"] = "pack://application:,,,/ViewLearn;component/优卓.webp";
            TableProducts.Rows.Add(row5);
            var row6 = TableProducts.NewRow();
            row6["ProductId"] = 6;
            row6["ProductName"] = "光合力量";
            row6["Price"] = 24.1m;
            row6["ManuDate"] = new DateTime(2025,2,21);
            row6["Des"] = "光合力量去皮鸡腿开袋即食高蛋白低减鸡肉零食脂卡熟食品饱腹速食";
            row6["ImagePath"] = "pack://application:,,,/ViewLearn;component/光合力量.webp";
            TableProducts.Rows.Add(row6);

        }

        public static List<ProductInfo> ListProducts = new List<ProductInfo>()
        {
            new ProductInfo()
            {
                ProductId = 1,
                ProductName = "每日坚果",
                Price = 19.5m,
                ManuDate = new DateTime(2025,1,13),
                Des = "500g混合坚果干果果仁礼盒小包",
                ImagePath = "pack://application:,,,/ViewLearn;component/每日坚果.webp"
            },
            new ProductInfo()
            {
                ProductId = 2,
                ProductName = "不多言",
                Price = 44.9m,
                ManuDate = new DateTime(2025,6,25),
                Des = "坚果芙饼干巴旦木椰片芙脆曲奇单独小包装干酪蛋糕网红休闲小零食",
                ImagePath = "pack://application:,,,/ViewLearn;component/不多言.jpg"
            },
            new ProductInfo()
            {
                ProductId = 3,
                ProductName = "杨先生",
                Price = 12,
                ManuDate = new DateTime(2025,4,5),
                Des = "芡实糕点营养早餐",
                ImagePath = "pack://application:,,,/ViewLearn;component/杨先生.webp"
            },
            new ProductInfo()
            {
                ProductId = 4,
                ProductName = "满铺",
                Price = 20.7m,
                ManuDate = new DateTime(2025,3,3),
                Des = "靖江猪肉脯干500g蜜汁味手撕肉铺网红零食小吃休闲食品罐装",
                ImagePath = "pack://application:,,,/ViewLearn;component/满铺.webp"
            },
            new ProductInfo()
            {
                ProductId = 5,
                ProductName = "优卓",
                Price = 23.3m,
                ManuDate = new DateTime(2025,2,9),
                Des = "山楂片干零食蓝莓桑葚官方旗舰店正宗无添加儿童健康小吃营养食品",
                ImagePath = "pack://application:,,,/ViewLearn;component/优卓.webp"
            },
            new ProductInfo()
            {
                ProductId = 6,
                ProductName = "光合力量",
                Price = 24.1m,
                ManuDate = new DateTime(2025,2,21),
                Des = "光合力量去皮鸡腿开袋即食高蛋白低减鸡肉零食脂卡熟食品饱腹速食",
                ImagePath = "pack://application:,,,/ViewLearn;component/光合力量.webp"
            }
        };

        public static DataTable TableProducts = new DataTable();
    }
}
